<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>垃圾分类识别系统</title>
    <style>
        .font1 {
            color: #187C21;
            font-weight: bold;
            font-size: 22px;
            text-align: left;
        }

        .ui_button {
            display: inline-block;
            line-height: 30px;
            padding: 0 18px;
            color: #FFFFFF;
            font-family: "微软雅黑";
            cursor: pointer;
            position: relative;
        }

        .ui_button_primary1 {
            background-color: #EE914C;
        }

        .ui_button_primary2 {
            background-color: #4472C4;
        }

        label.ui_button:hover {
            background-color: #d46216;
        }

        .card {
            box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
            transition: 0.3s;
            width: 400px;
            height: 400px;
            border-radius: 5px;
            margin: 15px;
            margin-top: 50px;
            text-align: center;
            display: inline-block;
            vertical-align: middle;
        }

        .container {
            padding: 2px 16px;
            display: inline-block;
            vertical-align: middle;
            text-align: center;
        }

        img.main {
            border-radius: 5px 5px 0 0;
            vertical-align: middle;
        }

        .show {
            text-align: center;
            clear: both;
        }

        .sort {
            margin: 20px;
            display: inline-block;
            vertical-align: top;
        }

        .text {
            width: 500px;
            background-color: #F2F2F2;
            display: inline-block;
            vertical-align: top;
        }

        .footer {
            text-align: center;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 2px;
            position: absolute;
            background-color: #187C21;
            opacity: 0.9;
        }

        a.main:link {
            color: #000000;
        }

        a.main:visited {
            color: #000000;
        }

        a.catalog:link {
            color: burlywood;
        }

        a.catalog:visited {
            color: #FFFFFF;
        }
    </style>
</head>

<body>

<div id="header" style="text-align:center">
    <h1 style="font-family: Verdana">垃圾分类</h1>
    <div style="margin:0 auto;width:220px;height:5px;background-color:#187C21"></div>
    <pre>干湿   有害   可回收  |  识别   分类  与科普</pre>
</div>

<div id="file_upload" style="text-align:center">
    <form action="/upload" method="post" enctype="multipart/form-data">
        <input type="text" name="textfield" id='textfield' class='txt' style="width: 500px;height: 23px;white-space:pre"
               value="图片路径">
        <label class="ui_button ui_button_primary1" for="xFile">上传</label>
        <label class="ui_button ui_button_primary2" for="insure">确认</label>
        <input name="fileField" type="file" id="xFile" style="position:absolute;clip:rect(0 0 0 0);"
               onchange="document.getElementById('textfield').value=this.value"/>
        <input type="submit" id="insure" style="position:absolute;clip:rect(0 0 0 0);"/>
    </form>

</div>
<div class="show">
    <div id="left" class="card container">
        <div style="width: 400px;height: 400px; display: table-cell;vertical-align: middle;">
            <img class="main" id="main_img" src="../static/images/img_selected.jpg"  alt="Avatar" style="max-height: 100%; max-width: 100%">
        </div>
    </div>
    <div id="right" class="sort">
        <div id="catalog1">
            <p class="font1">
                <img src="../static/icon/trashbox.svg"  alt="垃圾桶" style="width: 30px;height: 30px">
                垃圾种类
            </p>
            <div class="text" style="height: 70px;">
                <p>
                    <span style="font-size: 30px;font-weight: bold; margin: 5px">{{ name }}</span> 属于
                    <span style="font-size: 30px;font-weight: bold; margin: 5px">{{ catalog }}</span>&nbsp;(
                    概率为：{{ possible }} )
                </p>
            </div>
        </div>
        <div id="catalog2">
            <p class="font1">
                <img src="../static/icon/book.svg" alt="垃圾桶" style="width: 24px;height: 24px">
                垃圾科普
            </p>
            <div class="text" style="height: 210px;white-space:pre-line;text-align: left;">
                <p style="margin-left: 18px;margin-right: 10px"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ same_catalog }}</span>

                </p>
            </div>
        </div>
    </div>
</div>

<div style="text-align: center">
    <a href="/" class="main">返回主页</a>
</div>

<div class="footer">
    <p style="color: rgb(236,236,236); font-size: 16px">
        样本图片数量: 32313张&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
        训练集图片数量: 29081张&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
        训练集准确度: 83.8%&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
        测试集图片数量: 3232张&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
        测试集准确度: 67.5%&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
        可识别垃圾种类: <a href="/href" class="catalog">50种</a>
    </p>
</div>

</body>
</html>